package cjq.demo.thread.ch6_9;

import java.util.concurrent.atomic.AtomicIntegerArray;

/**
 * Created by Administrator on 2016/5/6.
 */
public class Decrementer implements Runnable {

    private AtomicIntegerArray vector;
    public Decrementer(AtomicIntegerArray vector){
        this.vector = vector;
    }

    public void run(){
        for (int i = 0; i < vector.length(); i++) {
            vector.getAndDecrement(i);
        }
    }
}
